Skip to content

fix(id): seed configured accounts into the serving world directory (#5119) - #8413

Merged
dezren39 merged 1 commit into
mainfrom
queue/14074-5119-serverconfig-live
Nov 11, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/14074-5119-serverconfig-live

Conversation

@dezren39

@dezren39 dezren39 commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Refs #5119 (remainder). Queue task 14074. Fixes the unresolved P2 from PR #8356's review (discussion r4532341753).

Problem

Slice 3 (PR #8356) persisted server-config provisioning into directory.jsonl beside the groups log. But a durable world loads its directory from .id-worlds/<name>/directory.jsonl (world_store::open_world), and nothing ever passed the provisioned accounts into that directory. Serving a durable world with --server-config therefore reported successful account provisioning at startup while the live world's directory view (directory_view.rs) treated the configured keys as anonymous.

Fix

  • Provisioned::apply_users is extracted from Provisioned::apply (behaviour-preserving: apply now calls it first, then the group loop, with identical report semantics). This lets a directory that is not the provisioning home receive the same accounts without taking the group events, which belong to the groups log.
  • cmd_serve, after the config load and fail-fast provisioning, seeds the default world's directory (the world serve opens at startup) via the new seed_world_directory helper whenever world serving is on and the serve is not ephemeral. Seeding is the same idempotent account application, so a restart creates nothing and reports nothing new.
  • Ephemeral worlds hold no directory file, so there is nothing to seed; their state is in-memory and ends with the process, like the world itself. Worlds other than the default open lazily and are not seeded — the config's accounts are server-level identities, and the default world is the serving world the P2 scenario describes.

Tests

  • New regression test seed_world_directory_provisions_configured_accounts: seeds a temp world directory from a two-user config, reopens it the way world_store::open_world does, asserts both accounts resolve, and asserts a second seed creates nothing.
  • Local verification (laptop, --no-default-features --features world, lib tests): commands::serve::tests:: 47/47 pass (incl. the slice-3 restart test and the pull-policy tests) and server_config:: 57/57 pass. Full default-feature suite is CI's verdict.

Deliberately not in this PR

The last #5119 remainder — wiring ServerConfig::freshness() into a seitan admission check that serve runs — has no consumer to wire into yet: seitan::Invite::admit takes the window as a parameter and has no production caller, and no serving path receives a seitan proof today. That remainder is being explicitly re-scoped on #5119 (it needs a serving admission path designed first), rather than being silently dropped or stubbed here.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…5119)

Slice 3 persisted server-config provisioning into directory.jsonl beside the groups log, but a durable world loads .id-worlds/<name>/directory.jsonl (world_store::open_world), so the live world directory view treated configured keys as anonymous while startup reported them provisioned (PR #8356 review, P2). Extract Provisioned::apply_users from apply (behaviour-preserving) and seed the default world directory from the loaded config at serve startup via seed_world_directory; idempotent, so restarts create nothing. Ephemeral worlds hold no directory file and are unchanged. Regression test seed_world_directory_provisions_configured_accounts; serve suite 47/47 and server_config suite 57/57 pass locally (world feature).
@dezren39
dezren39 requested a review from a team as a code owner November 11, 2026 02:01
@coderabbitai

coderabbitai Bot commented Nov 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 41 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 02125f17-3d7f-4cf0-b18d-4b9f52fb7886
Commits

Reviewing files that changed from the base of the PR and between 9b82fb9 and a84df12.

Files selected for processing: 2

  • pkgs/id/src/commands/serve.rs
  • pkgs/id/src/server_config/provision.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T02:03:28.106268Z a84df12 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39 dezren39 added queue/parked Queue task is parked (waiting on CI, time, or an event) status/parked Deliberately paused with a recorded resume condition labels Nov 11, 2026
@dezren39
dezren39 merged commit a5fe588 into main Nov 11, 2026
2 of 13 checks passed
@dezren39
dezren39 deleted the queue/14074-5119-serverconfig-live branch November 11, 2026 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

queue/parked Queue task is parked (waiting on CI, time, or an event) status/parked Deliberately paused with a recorded resume condition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant